﻿<UserControl x:Class="ChristianMoser.WpfInspector.UserInterface.LogicalTreeView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Background="#f4f4f4">
    <ListBox Style="{DynamicResource TreeListBoxStyle}" ItemsSource="{Binding Elements}" Margin="2,16,2,2" >
        <ListBox.ContextMenu>
            <ContextMenu >
                <MenuItem Header="Layout">
                    <MenuItem Header="Invalidate Visual" Command="{Binding Path=PlacementTarget.DataContext.InvalidateVisualCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
                    <MenuItem Header="Invalidate Arrange" Command="{Binding Path=PlacementTarget.DataContext.InvalidateArrangeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
                    <MenuItem Header="Invalidate Measure" Command="{Binding Path=PlacementTarget.DataContext.InvalidateMeasureCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
                    <MenuItem Header="Bring Into View" Command="{Binding Path=PlacementTarget.DataContext.BringIntoViewCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
                    <MenuItem Header="Focus" Command="{Binding Path=PlacementTarget.DataContext.FocusCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
                </MenuItem>
            </ContextMenu>
        </ListBox.ContextMenu>
    </ListBox>
</UserControl>
